package com.kaishengit.service;

import java.util.List;

import com.kaishengit.dao.UserDao;
import com.kaishengit.entity.User;

public class UserService {
	private UserDao userDao=new UserDao();
	
	public User findByName(String manager) {
		User user=userDao.findByName(manager);
		return user;
	}

	public List<User> findAll() {
		List<User> list=userDao.findAll();
		return list;
	}

	
	public List<User> findAllByProjectId(String projectid){
		return userDao.findByProjectId(projectid);
	}

	public void save(String userid, User user) {
		userDao.save(userid,user);
	}

	public void update(String userid, User user) {
		userDao.update(userid,user);
	}

	public User findById(String id) {
		return userDao.findById(id);
	}

}
